package com.wander.business.book.c2_2_5;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author Wander.Zeng
 * @create 2017-10-22 15:15
 * @desc DemoListener
 */
@Component
public class DemoListener implements ApplicationListener<DemoEvent> {

    @Override
    public void onApplicationEvent(DemoEvent event) {
        String msg = event.getMsg();
        System.out.println("bean-demoListener 接收到了 bean-demoPublisher 发布的消息 : " + msg);
    }

}
